
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module simpleparse.printers</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="simpleparse.html"><font color="#ffffff">simpleparse</font></a>.printers</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/mcfletch/pylive/simpleparse/printers.py">/home/mcfletch/pylive/simpleparse/printers.py</a></font></td></tr></table>
    <p><tt>Utility&nbsp;to&nbsp;print&nbsp;Python&nbsp;code&nbsp;for&nbsp;a&nbsp;given&nbsp;generator&nbsp;object's&nbsp;element&nbsp;tokens</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="string.html">string</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="simpleparse.printers.html#_GeneratorFormatter">_GeneratorFormatter</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="_GeneratorFormatter">class <strong>_GeneratorFormatter</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Singleton&nbsp;Class&nbsp;to&nbsp;give&nbsp;a&nbsp;generator's&nbsp;element&nbsp;tokens&nbsp;as&nbsp;a&nbsp;source&nbsp;string<br>
&nbsp;<br>
Call&nbsp;this&nbsp;as:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printers.asGenerator(&nbsp;generator&nbsp;)&nbsp;to&nbsp;get&nbsp;a&nbsp;Python&nbsp;source&nbsp;string<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;tries&nbsp;to&nbsp;recreate&nbsp;the&nbsp;generator&nbsp;as&nbsp;a&nbsp;set&nbsp;of&nbsp;objectgenerator<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;element&nbsp;token&nbsp;objects&nbsp;(as&nbsp;seen&nbsp;in&nbsp;simpleparsegrammar).<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="_GeneratorFormatter-__call__"><strong>__call__</strong></a>(self, generator)</dt></dl>

<dl><dt><a name="_GeneratorFormatter-reprObject"><strong>reprObject</strong></a>(self, obj, depth<font color="#909090">=0</font>, indent<font color="#909090">='    '</font>)</dt><dd><tt>Return&nbsp;a&nbsp;recognisable&nbsp;version&nbsp;of&nbsp;an&nbsp;objectgenerator&nbsp;element&nbsp;token</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>HEAD</strong> = 'from simpleparse import generator<font color="#c040c0">\n</font>from simplepar...return GENERATOR.buildParser( name, processor )<font color="#c040c0">\n\n</font>'</dl>

<dl><dt><strong>ITEM</strong> = 'GENERATOR.addDefinition(<font color="#c040c0">\n</font>    %(name)s,<font color="#c040c0">\n</font>    %(element)s,<font color="#c040c0">\n</font>)<font color="#c040c0">\n</font>'</dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-asObject"><strong>asObject</strong></a> = reprObject(self, obj, depth<font color="#909090">=0</font>, indent<font color="#909090">='    '</font>)<font color="#909090"><font face="helvetica, arial"> method of <a href="simpleparse.printers.html#_GeneratorFormatter">_GeneratorFormatter</a> instance</font></font></dt><dd><tt>Return&nbsp;a&nbsp;recognisable&nbsp;version&nbsp;of&nbsp;an&nbsp;objectgenerator&nbsp;element&nbsp;token</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>asGenerator</strong> = &lt;simpleparse.printers._GeneratorFormatter instance&gt;</td></tr></table>
</body></html>